package com.test.ds.review;

//bank.java
//demonstrates basic OOP syntax
//to run this program: C>java BankApp
/////////////////////////////////////////////////
class BankAccount {
	private double balance;

	public BankAccount(double openingBalance) {
		balance = openingBalance;
	}

	public void deposit(double amount) {
		balance = balance + amount;
	}

	public void withdraw(double amount) {
		balance = balance - amount;
	}

	public void display() {
		System.out.println("balance = " + balance);
	}
} // end class BankAccount
// ///////////////////////////////////////////////

class BankApp {
	public static void main(String[] args) {
		BankAccount ba1 = new BankAccount(100.00);

		System.out.print("Before transations, ");
		ba1.display();

		ba1.deposit(74.35);

		ba1.withdraw(20.00);

		System.out.print("After transations, ");
		ba1.display();
	} // end main()

} // end class BankApp